/**
 * Created by fangshufeng on 2018/2/27.
 */
import React from 'react'

import QRCode from 'qrcode.react'

import {
    Modal, Row, Col, Button
} from 'antd';

export default class QrCodeView extends React.Component {

    render() {

        return <Modal
            title={ <div className="msg" style={{fontFamily: 'Microsoft YaHei'}}>当前环境：
                <span style={{color: 'blue'}}>{this.props.currentEnv}</span>
                <p> </p>
                <div>手动关联请输入以下序列号：</div>
                <span style={{color: 'red'}}>{this.props.socketID}</span>
            </div>}
            wrapClassName="vertical-center-modal"
            visible={true}
            style={{top: 1}}
            closable={false}
            footer={<Button onClick={() => this.props.reChange()}>更换环境？</Button>}
            maskClosable={false}
        >
            <Row type='flex' justify="center">
                <Col span={9}>
                    <div><QRCode value={ "nonobankMock://" + this.props.socketID}/></div>
                </Col>
            </Row>

        </Modal>
    }
}